home *** CD-ROM | disk | FTP | other *** search
/ Creating Your Own America Online Web Pages / Creating Your Own America Online Web Pages.iso / TOOLS / TEX2RTF / SOURCES.ZIP / SRC / TEX2RTF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-10  |  3.1 KB  |  136 lines

  1. /*
  2.  * tex2rtf.h
  3.  *
  4.  * Main include for all converters
  5.  *
  6.  */
  7.  
  8. #ifndef NO_GUI
  9. // Define a new application type
  10. class MyApp: public wxApp
  11. { public:
  12.     wxFrame *OnInit(void);
  13. };
  14.  
  15. // Define a new frame type
  16. class MyFrame: public wxFrame
  17. { public:
  18.     wxTextWindow *textWindow;
  19.     MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
  20.     void OnMenuCommand(int id);
  21.     Bool OnClose(void);
  22. };
  23.  
  24. #ifdef wx_msw
  25. #include "wx_ipc.h"
  26.  
  27. class Tex2RTFConnection: public wxConnection
  28. {
  29.  public:
  30.   Tex2RTFConnection(char *buf, int size);
  31.   ~Tex2RTFConnection(void);
  32.   Bool OnExecute(char *topic, char *data, int size, int format);
  33.   char *OnRequest(char *topic, char *item, int *size, int format);
  34. //  Bool OnPoke(char *topic, char *item, char *data, int size, int format);
  35. };
  36.  
  37. class Tex2RTFServer: public wxServer
  38. {
  39.  public:
  40.   wxConnection *OnAcceptConnection(char *topic);
  41. };
  42.  
  43. #endif // wx_msw
  44.  
  45. #endif // NO_GUI
  46.  
  47. /*
  48.  * Itemize/enumerate structure
  49.  *
  50.  */
  51.  
  52. #define LATEX_ENUMERATE   1
  53. #define LATEX_ITEMIZE     2
  54. #define LATEX_DESCRIPTION 3
  55. #define LATEX_TWOCOL      5
  56. #define LATEX_INDENT      6
  57.  
  58. class ItemizeStruc: public wxObject
  59. {
  60.   public:
  61.     int listType;
  62.     int currentItem;
  63.     int indentation;
  64.     int labelIndentation;
  65.     inline ItemizeStruc(int lType, int indent = 0, int labIndent = 0)
  66.     { listType = lType; currentItem = 0;
  67.       indentation = indent; labelIndentation = labIndent; }
  68. };
  69.  
  70. // ID for the menu quit command
  71. #define TEX_QUIT 1
  72. #define TEX_GO   2
  73.  
  74. #define TEX_SET_INPUT   3
  75. #define TEX_SET_OUTPUT  4
  76.  
  77. #define TEX_VIEW_LATEX  5
  78. #define TEX_VIEW_OUTPUT 6
  79.  
  80. #define TEX_VIEW_CUSTOM_MACROS 7
  81. #define TEX_LOAD_CUSTOM_MACROS 8
  82.  
  83. #define TEX_MODE_RTF    9
  84. #define TEX_MODE_WINHELP 10
  85. #define TEX_MODE_HTML   11
  86. #define TEX_MODE_XLP    12
  87.  
  88. #define TEX_HELP        13
  89. #define TEX_ABOUT       14
  90. #define TEX_SAVE_FILE   15
  91.  
  92. extern TexChunk *currentMember;
  93. extern Bool startedSections;
  94. extern char *contentsString;
  95. extern Bool suppressNameDecoration;
  96. extern wxList itemizeStack;
  97.  
  98. extern FILE *Contents;
  99. extern FILE *Chapters;
  100. extern FILE *Sections;
  101. extern FILE *Subsections;
  102. extern FILE *Subsubsections;
  103.  
  104. extern char *InputFile;
  105. extern char *OutputFile;
  106. extern char *MacroFile;
  107.  
  108. extern char *FileRoot;
  109. extern char *ContentsName;    // Contents page from last time around
  110. extern char *TmpContentsName; // Current contents page
  111. extern char *RefName;         // Reference file name
  112. extern char *bulletFile;
  113.  
  114. #ifndef NO_GUI
  115. void ChooseOutputFile(Bool force = FALSE);
  116. void ChooseInputFile(Bool force = FALSE);
  117. #endif
  118.  
  119. void RTFOnMacro(int macroId, int no_args, Bool start);
  120. Bool RTFOnArgument(int macroId, int arg_no, Bool start);
  121.  
  122. void HTMLOnMacro(int macroId, int no_args, Bool start);
  123. Bool HTMLOnArgument(int macroId, int arg_no, Bool start);
  124.  
  125. void XLPOnMacro(int macroId, int no_args, Bool start);
  126. Bool XLPOnArgument(int macroId, int arg_no, Bool start);
  127.  
  128. Bool RTFGo(void);
  129. Bool HTMLGo(void);
  130. Bool XLPGo(void);
  131.  
  132. extern void ClearKeyWordTable(void);
  133. extern void AddKeyWordForTopic(char *topic, char *entry);
  134.  
  135. #define ltHARDY         10000
  136.